package cn.edu.sjtu.literature.service;

import java.util.List;

import cn.edu.sjtu.literature.entity.Category;
import cn.edu.sjtu.literature.entity.Literature;
import cn.edu.sjtu.literature.service.exception.LiteratureAlreadyExistsException;

public interface LiteratureService {

	void addLiterature(Literature literature) throws LiteratureAlreadyExistsException;
	
	Literature getLiterature(int id);
	
	void updateLiterature(Literature literature) throws LiteratureAlreadyExistsException;
	
	List<Literature> queryLiteratures(LiteratureQuery query);
	
	List<Category> getCategories();
	
}
